using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Sockets;
using System.Net;


namespace Msrp.Network
{
    public sealed class NetworkLayer
    {
        public static NetworkLayer Instance
        {
            get
            {
                return instance;
            }
        }

        Dictionary<IPEndPoint, ConnectionHandler> mHandlerMap = new Dictionary<IPEndPoint, ConnectionHandler>();
        private static readonly NetworkLayer instance = new NetworkLayer();
        private NetworkLayer() { }

        private IList getSockets()
        {
            List<Socket> socketList = new List<Socket>();
            foreach(ConnectionHandler ch in mHandlerMap.Values)
            {
                socketList.Add(ch.getSocket());
            }
            return socketList;
        }
    }
}
